use Minion;

# Connect to backend
my $minion = Minion->new(SQLite => 'sqlite:test.db');

# Add tasks
$minion->add_task(sth_slow => sub ($job, @args) {
    sleep 5;
    print "This is a background worker process.\n";
});

# Enqueue jobs
$minion->enqueue(sth_slow=>['foo', 'bar']);
$minion->enqueue(sth_slow=>[1, 2, 3])=>{priority=>5};

# Perform jobs for testing
$minion->enqueue(sth_slow=>['work', 'done']);
$minion->perform_jobs;

# Start a worker to perform up to 12 jobs concurrently
my $worker = $minion->worker;
$worker->status->{jobs} = 12;
$worker->run;




